import request from '@/utils/request';

export function getContentList(params) {
  return request({
    url: '/personPrepareLesson/page',
    method: 'post',
    data: params
  });
}

export function reportPage(params) {
  return request({
    url: '/teachingResearch/reportPage',
    method: 'post',
    data: params
  });
}

// 素材列表
export function resPlatform(params) {
  return request({
    url: '/resPlatform/page',
    method: 'post',
    data: params
  });
}

// 删除素材
export function resPlatformDel(id) {
  return request({
    url: '/resPlatform/delete',
    method: 'DELETE',
    params: id
  });
}

// 素材详情
export function resPlatformDetail(id) {
  return request({
    url: '/resPlatform/getById',
    method: 'get',
    params: id
  });
}

// 保存素材
export function resPlatformSave(params) {
  return request({
    url: '/resPlatform/save',
    method: 'post',
    data: params
  });
}

// 更新素材
export function resPlatformUpdate(params) {
  return request({
    url: '/resPlatform/update',
    method: 'post',
    data: params
  });
}

export function getLessonList(params) {
  return request({
    url: '/personPrepareLesson/page',
    method: 'post',
    data: params
  });
}

export function getDesignDetail(searchId) {
  return request({
    url: `/personPrepareLesson/detail?id=${searchId}`,
    method: 'get'
  });
}

// 教研报告详情
export function getTeachingResearchReport(reportId) {
  return request({
    url: `/teachingResearch/getTeachingResearchReport?reportId=${reportId}`,
    method: 'get'
  });
}

// 更新教研报告
export function updateReport(params) {
  return request({
    url: `/teachingResearch/updateReport`,
    method: 'post',
    data: params
  });
}

// 根据上层分类查询下层分类
export function findByPCateId(params) {
  return request({
    url: process.env.VUE_APP_BASIC_API + `/category/findByPCateId`,
    method: 'post',
    params: params
  });
}

// 查找栏目分类
export function findColumnTags(params) {
  return request({
    url: `/tags/findColumnTags`,
    method: 'post',
    data: params
  });
}

// 查找标签列表
export function findTagsList(params) {
  return request({
    url: `/tags/findTagsList`,
    method: 'post',
    data: params
  });
}

// 章节列表查询课题
export function bookChapterList(params) {
  return request({
    url: process.env.VUE_APP_BASIC_API + `/bookChapter/findList`,
    method: 'post',
    data: params
  });
}

// 评论
export function getComment(params) {
  return request({
    url: process.env.VUE_APP_BASIC_API + `/comment/page`,
    method: 'post',
    data: params
  });
}

// 评论 屏蔽/恢复
export function updateStatus(params) {
  return request({
    url: process.env.VUE_APP_BASIC_API + `/comment/updateStatus`,
    method: 'post',
    params: params
  });
}

// 内容审核 通过/不通过
export function audit(params) {
  return request({
    url: `/contentAudit/audit`,
    method: 'post',
    params: params
  });
}

// 修改备课-基本信息
export function updateBaseInfo(params) {
  return request({
    url: `/personPrepareLesson/updateBaseInfo`,
    method: 'post',
    data: params
  });
}

// 更新备课-栏目标签-分类标签
export function personPrepareLessonUpdate(params) {
  return request({
    url: `/personPrepareLesson/update`,
    method: 'post',
    data: params
  });
}

// 标签列表查询-重难点
export function findImportTagsList(params) {
  return request({
    url: `/tags/findImportTagsList`,
    method: 'post',
    data: params
  });
}

// 新增内容标签
export function addContentTags(params) {
  return request({
    url: `/tags/addContentTags`,
    method: 'post',
    data: params
  });
}

// 标签列表查询-根据重难点 查询能力提升标签
export function findByPMapper(params) {
  return request({
    url: `/tags/findByPMapper`,
    method: 'post',
    data: params
  });
}

// 编辑教案
export function saveResTeaching(params) {
  return request({
    url: `/personPrepareLesson/saveResTeaching`,
    method: 'post',
    data: params
  });
}

// 编辑教学反思
export function saveResTeachingReflection(params) {
  return request({
    url: `/personPrepareLesson/saveResTeachingReflection`,
    method: 'post',
    data: params
  });
}
